#pragma once
#include "DXAMLCommon.h"
#include "CMILMatrix.h"
#include "IPALAcceleratedGeometry.h"
#include "IPALAcceleratedBrush.h"
#include "IPALStrokeStyle.h"

#include "PALText.IFontAndScriptServicesFactory.h"

using namespace PALText;


class IPALAcceleratedRender
{
public:
	virtual HRESULT SetTransform(CMILMatrix *pMatrix) = 0;
	virtual HRESULT FillGeometry(IPALAcceleratedGeometry *pGeometry, IPALAcceleratedBrush *pBrush, float opacity) = 0;
	virtual HRESULT DrawGeometry(IPALAcceleratedGeometry *pGeometry, IPALAcceleratedBrush *pBrush, float rStrokeWidth, IPALStrokeStyle *pStrokeStyle, float opacity) = 0;
	virtual HRESULT FillRectangle( XRECTF_RB *rect, IPALAcceleratedBrush *pBrush, float opacity) = 0;
	virtual HRESULT DrawRectangle(XRECTF_RB *rect, IPALAcceleratedBrush *pBrush, float rStrokeWidth, IPALStrokeStyle *pStrokeStyle, float opacity) = 0;
	virtual HRESULT FillRoundedRectangle(XRECTF_RB *rect, float rRadiusX, float rRadiusY, IPALAcceleratedBrush *pBrush, float opacity) = 0;
	virtual HRESULT DrawRoundedRectangle(XRECTF_RB *rect, float rRadiusX, float rRadiusY, IPALAcceleratedBrush *pBrush, float rStrokeWidth, IPALStrokeStyle *pStrokeStyle, float opacity) = 0;
	virtual HRESULT FillEllipse(XPOINTF *center, float rRadiusX, float rRadiusY, IPALAcceleratedBrush *pBrush, float opacity) = 0;
	virtual HRESULT DrawEllipse(XPOINTF *center, float rRadiusX, float rRadiusY, IPALAcceleratedBrush *pBrush, float rStrokeWidth, IPALStrokeStyle *pStrokeStyle, float opacity) = 0;
	virtual HRESULT DrawGlyphRun(PALText::GlyphRun *pGlyphRun, IPALAcceleratedBrush *pBrush, float opacity) = 0;
	virtual HRESULT PushOpacityLayer( float rOpacity, XRECTF_RB *pContentBounds) = 0;
	virtual HRESULT PushClipLayer(IPALAcceleratedGeometry *pPALClipGeometry, XRECTF_RB *pContentBounds) = 0;
	virtual HRESULT PopLayer() = 0;
	virtual void PushAxisAlignedClip(XRECTF_RB *pClip) = 0;
	virtual void PopAxisAlignedClip() = 0;
};